<?php
$this->breadcrumbs=array(
	'导航菜单',
	'管理',
);

$this->menu=array(
//	array('label'=>'List NavMenu', 'url'=>array('index')),
//	array('label'=>'Create NavMenu', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('nav-menu-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>管理导航菜单</h1>

<?php echo CHtml::link('高级搜索','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'nav-menu-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'title',
		'url',
//		'status_id',
    array('name'=>'status_id', 'value'=>'$data->status->status_name', 'filter'=>StatusType::model()->getStatusTypeList()),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
